\hypertarget{convdiff4_8cpp}{
\subsection{Examples/06ConvDiff/convdiff4.cpp File Reference}
\label{convdiff4_8cpp}\index{Examples/06ConvDiff/convdiff4.cpp@{Examples/06ConvDiff/convdiff4.cpp}}
}


This code simulate Natural Convection in a unit square with oscillating BC.  




\subsubsection{Detailed Description}
\begin{DoxyAuthor}{Author}
Luis M. de la Cruz \mbox{[} Sat May 23 12:06:36 CDT 2009 \mbox{]}
\end{DoxyAuthor}
The equations to be solved are of the form: \[ \frac{\partial \phi}{\partial t} + \frac{\partial}{\partial x_j} \Big(u_j\phi\Big) = \frac{\partial}{\partial x_j}\left(\Gamma\frac{\partial\phi}{\partial x_j}\right) + S, \,\,\,\,\,\,\,\,\textrm{for } j = 1,2 \]

where $ \phi $ is a scalar variable $T, \rho, u_1$ or $u_2 $. $ \Gamma $ is a diffusion coefficient and $ S $ is the source term.

In this case we have an energy equation in terms of temperature $T$, coupled with the Navier-\/Stokes equations. The coupled equations are solved with the SIMPLEC strategy.

These equation are solved in a unit square $ x, y \in [0,1] \times [0,1]$. Next figure shows the domain and the kind of oscillating boundary conditions imposed.

 
\begin{DoxyImage}
\includegraphics[width=7cm]{conv2D_2}
\caption{Oscillating boundary conditions}
\end{DoxyImage}


A fraction of two opposite walls have constant temperatures but different. The other walls are adiabatic. The no-\/slip condition is applied on all walls.

To compile and run this example type the next commands: \begin{DoxyParagraph}{}
\begin{DoxyVerb}
   % make
   % ./convdiff4 \end{DoxyVerb}
 
\end{DoxyParagraph}


Definition in file \hyperlink{convdiff4_8cpp_source}{convdiff4.cpp}.

